﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace jianvgroup.com.Models
{
    public class ResultModels
    {
        public ResultModels()
        {
            IsSuccessful = false;
            ResultCode = 100;
        }

        public ResultModels Faile(string message)
        {
            this.IsSuccessful = false;
            this.ResultMessage = message;
            this.ResultCode = 200;
            return this;
        }
        /// <summary>
        /// 返回是否错误
        /// </summary>
        public bool IsSuccessful { get; set; }

        /// <summary>
        /// 返回错误代码
        /// </summary>
        public int ResultCode { get; set; }

        /// <summary>
        /// 返回错误信息
        /// </summary>
        public string ResultMessage { get; set; }
    }

    public class BizResult<T> where T : class
    {
        public string msg { get; set; }
    }
}
